<template>
  <div class="q-pa-md bg-grey-9 text-white">
    <div class="q-gutter-y-md column" style="max-width: 300px">
      <div>
        <t-toggle v-model="readonly" label="Readonly" dark />
        <t-toggle v-model="disable" label="Disable" dark />
      </div>

      <t-input dark v-model="text" :readonly="readonly" :disable="disable">
        <template v-slot:prepend>
          <t-icon name="event" />
        </template>
      </t-input>

      <t-input
        dark
        filled
        v-model="text"
        :readonly="readonly"
        :disable="disable"
      >
        <template v-slot:prepend>
          <t-icon name="event" />
        </template>
      </t-input>

      <t-input
        dark
        outlined
        v-model="text"
        :readonly="readonly"
        :disable="disable"
      >
        <template v-slot:append>
          <t-avatar>
            <img src="https://cdn.quasar.dev/logo-v2/svg/logo-dark.svg" />
          </t-avatar>
        </template>
      </t-input>

      <t-input
        dark
        standout
        bottom-slots
        v-model="text"
        label="Label"
        counter
        :readonly="readonly"
        :disable="disable"
      >
        <template v-slot:prepend>
          <t-icon name="place" />
        </template>
        <template v-slot:append>
          <t-icon name="close" @click="text = ''" class="cursor-pointer" />
        </template>

        <template v-slot:hint> Field hint </template>
      </t-input>

      <t-input
        dark
        borderless
        v-model="text"
        :readonly="readonly"
        :disable="disable"
      >
        <template v-slot:append>
          <t-icon name="search" />
        </template>
      </t-input>
    </div>
  </div>
</template>

<script>
  import { ref } from 'vue';

  export default {
    setup() {
      return {
        text: ref(''),
        readonly: ref(false),
        disable: ref(false),
      };
    },
  };
</script>
